<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>dom</title>
	<style type="text/css">
		.box{
			width: 300px;
			height: 300px;
			background: red url() 0 0 no-repeat;
		}
	</style>
</head>
<body>

	<div class="box " id="box">
		
	</div>
	<script type="text/javascript">
		var box=document.getElementById('box');
		box.style.border='3px solid blue';
		// alert(box.setAttribute('class','box1'));//用box1替换原来的box，可以在浏览器查看元素中看到
		// alert(box.getAttribute('class','box'));


	</script>
</body>
</html>